package com.gpj.learn.springmvc.xml.controller;

import com.gpj.learn.springmvc.xml.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @className TestController
 * @description
 *   TODO
 * @author GPJ
 * @date 2021/8/18 15:28
 * @version 1.0
 **/
@Slf4j
@Controller
@RequestMapping("/gpj")
public class TestController {
	@Autowired
	private TestService service;

	@ResponseBody
	@GetMapping("/simple.do")
	public String simple() {
		return  "simple";
	}

	@ResponseBody
	@GetMapping("/service.do")
	public void service() {
		service.test();
	}

	@GetMapping("/model.do")
	public String model() {
		return "view";
	}
}
